package squareBorderPackage;

public class OpenBorder extends Border {

	/**
	 * Initialize this new openBorder.
	 */
	public OpenBorder(Square[] squares, Direction directionOfFirstSquare) {
		super(squares, directionOfFirstSquare);
	}
	
	public OpenBorder(Square square, Direction direction) {
		super(square, direction);
	}

	/**
	 * Return whether this openBorder is slippery or not.
	 */
	public boolean getSlippery() {
		return slippery;
	}

	/**
	 * Variable registering whether this openBorder is slippery or not.
	 */
	private final static boolean slippery = false;

	/**
	 * Return whether this wall is an obstacle or not.
	 * 
	 * @return result==true;
	 */
	public boolean isObstacle() {
		return false;
	}

	/**
	 * @return This border if the other border is not effective | if (other ==
	 *         null) | then (result == this)
	 * @return This border if the other border is a open border. |if (other
	 *         instanceof OpenBorder) | then (result == this)
	 * @return The strongest border of the other border and this border in all
	 *         other cases. |if (! (other == null || | other instanceof
	 *         OpenBorder)) | then (result == other.getStrongestBorder(this)
	 */
	@Override
	public Border getStrongestBorder(Border other) {
		if (other == null)
			return this;
		if (other instanceof OpenBorder)
			return this;
		return other.getStrongestBorder(this);

	}

}
